diff --git a/CHANGELOG.md b/CHANGELOG.md index 32590d344f0..d0986ae5797 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +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 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 diff --git a/js/src/widget.ts b/js/src/widget.ts index 284116648da..e907c365092 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,18 @@ 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"]; 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"]; selectorObject = { type: "lasso", - selector_state: { - xs: data["lassoPoints"]["x"], - ys: data["lassoPoints"]["y"], - }, + selector_state: lassoData, }; } else { selectorObject = null; 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) diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index ad5b00b559b..f282a51e4cb 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,14 +1,14 @@ -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+` +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=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(;j24?(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,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+` +`||Ae[j]===" "||Ae[j]===" ");)j++;let Xe;if(q(Ae)&&(Xe=re(Ae),Xe.type!==V.Hue)){Le.push({type:V.Alpha,value:Xe});continue}if(Y(Ae)&&le(Ae)==="none"){Le.push({type:V.Alpha,value:{type:V.None,value:void 0}});continue}return}if(/\d/.test(We)){j--,Le.push(re(Ae));continue}if(W.test(We)){j--,Le.push(ue(Ae));continue}return}return Le}function pe(ve){ve._i=0;let Ae=ve[ve._i++];if(!Ae||Ae.type!==V.Function||Ae.value!=="color"||(Ae=ve[ve._i++],Ae.type!==V.Ident))return;let Le=$[Ae.value];if(!Le)return;let We={mode:Le},Xe=we(ve,!1);if(!Xe)return;let rt=J(Le).channels;for(let Ct=0,Jt,br;Ct4)){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,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;N1?(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=` @@ -73,7 +73,7 @@ var obe=Object.create;var NG=Object.defineProperty;var sbe=Object.getOwnProperty 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);_ete.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 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  -`),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;O0}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,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<>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<J&&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; +`]);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; @@ -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 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: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;X1?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;kj&&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;pj&&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,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; +`),J=Z.length,N=Math.round(L*I),H=I,W=I*2,U=0,V=J*N+W;R.height-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; @@ -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[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},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:` +`),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; @@ -2694,7 +2694,7 @@ void main() { 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} +`),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} @@ -2708,7 +2708,7 @@ void main() { {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"?` +Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(f[1])} }\`.`)];let h=[];return e.layerType==="symbol"&&l==="text-font"&&h2(Yv(s))&&Rl(s.type)==="identity"&&h.push(new qa(t,s,'"text-font" does not support identity functions')),h.concat(a({key:e.key,value:s,valueSpec:c,style:i,styleSpec:o,expressionContext:"property",propertyType:r,propertyKey:l}))}function LR(e){return DR(e,"paint")}function FR(e){return DR(e,"layout")}function PR(e){var r,t;let a=[],i=e.value,o=e.key,s=e.style,l=e.styleSpec;if(fo(i)!=="object")return[new qa(o,i,`object expected, ${fo(i)} found`)];!i.type&&!i.ref&&a.push(new qa(o,i,'either "type" or "ref" is required'));let n=Rl(i.type),u=Rl(i.ref);if(i.id){let c=Rl(i.id);for(let f=0;f{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 @@ -3523,9 +3523,9 @@ precision highp float; 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,`{ +`),E=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost()){this.failedToCreate=!0;return}u.shaderSource(E,v),u.compileShader(E),u.attachShader(this.program,E);let M=u.createShader(u.VERTEX_SHADER);if(u.isContextLost()){this.failedToCreate=!0;return}u.shaderSource(M,x),u.compileShader(M),u.attachShader(this.program,M),this.attributes={};let C={};if(this.numAttributes=h.length,u.linkProgram(this.program),!u.getProgramParameter(this.program,u.LINK_STATUS)){if(u.isContextLost()){this.failedToCreate=!0;return}throw u.getShaderParameter(E,u.COMPILE_STATUS)?u.getShaderParameter(M,u.COMPILE_STATUS)?Error(`Program failed to link: ${u.getProgramInfoLog(this.program)}`):Error(`Could not compile vertex shader: ${u.getShaderInfoLog(M)}`):Error(`Could not compile fragment shader: ${u.getShaderInfoLog(E)}`)}$1e(u,this.program);let w=J1e(u,this.program);for(let k of h){if(!k)continue;let T=u.getAttribLocation(this.program,k);T>=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,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," ")+` +`)}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+=`'; @@ -3542,7 +3542,7 @@ __p += '`),ye&&(Fa+=`' + 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}; +}`;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: